package com.dx.mes.common.dao.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.dx.common.table.ppt.Bis_path;
import com.dx.common.table.ppt.Bis_path_swh;
import com.dx.common.table.ppt.Bis_path_swhId;
import com.dx.mes.common.core.dao.impl.GenericHibernateDao;
import com.dx.mes.common.dao.IBisPathSwhDao;

@Repository
public class BisPathSwhHibernateDao extends GenericHibernateDao<Bis_path_swh, Bis_path_swhId>
		implements IBisPathSwhDao {
		
		public List<Bis_path_swh> getPathSwh(Bis_path fr_bis_path, String swh_type) {
			List<Bis_path_swh> bis_path_swhList = new ArrayList<Bis_path_swh>();

			String sqlGetPathSwh = "FROM Bis_path_swh WHERE id.fr_path_id_fk='"
					+ fr_bis_path.getId().getPath_id_fk()
					+ "' AND id.fr_path_ver_fk='"
					+ fr_bis_path.getId().getPath_ver_fk()
					+ "' AND id.fr_ope_no_fk='"
					+ fr_bis_path.getId().getCr_ope_no() + "' AND id.swh_typ='"
					+ swh_type + "'";
			bis_path_swhList = this.find(sqlGetPathSwh);

			return bis_path_swhList;
		}
}
